<!DOCTYPE html>
<html data-ng-app="com.dcos.app">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>数据展示</title>

	<link rel="stylesheet" href="../../bower_components/animate.css/animate.css" />
	<link rel="stylesheet" href="../../bower_components/angular-material/angular-material.css" />
	<link rel="stylesheet" href="../../bower_components/angular-ui-select/dist/select.css" />
	<link rel="stylesheet" href="../../bower_components/ng-scrollbar/dist/ng-scrollbar.css" />
	<link rel="stylesheet" href="../../main.css">
	<!-- 外部js文件引用-->
	<script type="text/javascript" src="../../datatable/myIndexedDB.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular/angular.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/jquery/dist/jquery.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-animate/angular-animate.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-touch/angular-touch.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-sanitize/angular-sanitize.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-resource/angular-resource.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-ui-router/release/angular-ui-router.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/bootstrap-sass/assets/javascripts/bootstrap.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/modernizr/modernizr.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/moment/moment.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/underscore/underscore.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-bootstrap/ui-bootstrap-tpls.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-bootstrap-contextmenu/contextMenu.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-aria/angular-aria.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-messages/angular-messages.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-material/angular-material.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-cookies/angular-cookies.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/angular-ui-select/dist/select.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/json-editor/dist/jsoneditor.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/highcharts/highcharts.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/ng-scrollbar/dist/ng-scrollbar.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/ng-file-upload/ng-file-upload.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/eve-raphael/eve.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../bower_components/raphael/raphael.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../../app.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../configs/config.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../configs/router.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../configs/service.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../constants/api.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/templatemanage/create/create.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/templatemanage/detail/detail.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/templatemanage/detail/detail.service.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/templatemanage/templatemanage.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/templatemanage/templatemanage.route.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/templatemanage/templatemanage.service.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/build/build.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/build/build.service.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/create/alert/alert.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/create/copy.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/create/create.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/create/create.service.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/create/template/create.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/template/template.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/workflow.controller.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/workflow.route.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../controllers/workflow/workflow.service.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/breadCrumb/breadCrumb.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/command/command.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/confirm/confirm.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/contextMenu/contextMenu.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/flow/container.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/flow/nodeDrag.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/highchartsNg/highchartsNg.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/inputFile/inputFile.directive.js" charset="utf-8"></script>
	<!--<script type="text/javascript" src="../../directive/layout-header/header.js" charset="utf-8"></script>-->
	<!--<script type="text/javascript" src="../../directive/layout-header/layoutHeader.directive.js" charset="utf-8"></script>-->
	<!--<script type="text/javascript" src="../../directive/layout-menu/layoutMenu.directive.js" charset="utf-8"></script>-->
	<!--<script type="text/javascript" src="../../directive/layout-menu/menu.js" charset="utf-8"></script>-->
	<script type="text/javascript" src="../../directive/layout/_layout.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/layout/layout.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/pagination/pagination.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/timer/timer.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../directive/waiting/waiting.directive.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../filter/object.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../filter/page.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../libraries/angular-json-editor.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../libraries/angular-locale_zh-cn.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../libraries/jsoneditor.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="../js/jquery.media.js" charset="utf-8"></script>
</head>
<style>
	.body {font-family:sans-serif;}
	#donetestcases{border:solid 1px #E9E9E9;}
	#addbugs{border:solid 1px #E9E9E9;}
	#validbugs{border:solid 1px #E9E9E9;}
	#requirementdone{border:solid 1px #E9E9E9;}
	#codenumsubmit{border:solid 1px #E9E9E9;}
	#costtime{border:solid 1px #E9E9E9;}

	.confirmModal .modal-content {
		width: 450px;
		margin-top: 40%;
	}

</style>
<body data-ng-controller="WorkFlowController">
<div class="main-wrapper" ui-view>
	<div class="main">
		<div class="p-workflow-list">
			<div class="pt-2">
				<div class="toolbar">
					<div class="btn-group" uib-dropdown dropdown-append-to-body>
						<button type="button" class="btn btn-default-dark" ng-click="add()"> 创建工作流 <span class="caret"></span>
						</button>
						<!--<ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="btn-append-to-body">
							<li role="menuitem"><a ng-click="createByTemplate()" style="cursor: pointer;">基于模板</a></li>
							<li role="menuitem"><a ng-click="add()" style="cursor: pointer;">直接创建</a></li>
						</ul>-->
					</div>
					<input class="input pull-right" ng-model="query" ng-change="changePager()" placeholder="输入名称搜索">
				</div>
				<table class="pt-table">
					<thead>
					<tr>
						<th>工作流</th>
						<th custom-sort="group" sort-key="sortKey" reverse="reverse">
							<span>最新更新</span>
							<i class="fa fa-sort"></i>
						</th>
						<th>状态</th>
						<th style="width: 140px; ">操作</th>
					</tr>
					</thead>
					<tbody ng-if="loading">
					<tr>
						<td class="text-center" colspan="4"><i class="fa fa-spinner fa-pulse"></i></td>
					</tr>
					</tbody>
					<tbody ng-if="!loading && pipelineData.length === 0">
					<tr>
						<td class="text-center" colspan="4">暂无数据</td>
					</tr>
					</tbody>
					<tbody ng-if="!loading &&pipelineData.length > 0">
					<tr ng-repeat="pipeline in pipelineData | filter: {p_name: query} | orderBy:sortKey:reverse | page:page:pageSize">
						<!--<td><a ng-click="edit(pipeline.p_id)">{{ pipeline.p_name }}</a></td>-->
						<td>{{ pipeline.p_name }}</td>
						<td>{{ pipeline.create_time }}</td>
						<td ng-if="pipeline.status == '0'">
							未启用
						</td>
						<td ng-if="pipeline.status == '1'">
							已启用
						</td>
						<td ng-if="pipeline.status == '2'">
							进行中
						</td>
						<td>
							<img ng-if="pipeline.status=='1'" width="16" height="16" src="../../images/start.png" ng-click="bulid(pipeline.status,pipeline.p_id)" alt="构建" title="构建" />
							<img ng-if="pipeline.status=='2'" width="16" height="16" src="../../images/stop.png" ng-click="stop(pipeline.p_id)" alt="停止构建" title="停止构建" />
							<img ng-if="pipeline.status=='1'" width="16" height="16" src="../../images/delete.png"  confirm data-msg="{{msg}}" data-id="{{pipeline.p_id}}" alt="删除"  title="删除" />
						</td>
					</tr>
					</tbody>
				</table>
				<custom-pager page="page" page-size="pageSize" item-length="itemLength" total-count="totalCount" ng-if="totalCount"></custom-pager>
			</div>
		</div>
	</div>
</div>
</body>
</html>
